1. Field of the Invention
This invention relates to a musical tone-generating method which generates musical tone waveforms by executing a musical tone-generating program by means of a programmable processing unit such as a CPU or a DSP (Digital Signal Processor), and also relates to a musical tone-generating apparatus which generates musical tone waveforms by executing a musical tone-generating program.
2. Prior Art
In a conventional tone generator or a conventional musical tone-generating program which generates musical tone waveforms, through computation, the sampling frequency, the maximum number of musical tones that can be generated at the same time, and the contents of processing of each musical tone are set beforehand, irrespective of the types of musical tones to be generated and conditions under which other processings such as background processing are executed.
In the conventional tone generator and the musical tone-generating program, however, the following inconveniences have been encountered:
(1) Musical tone-generating operations employed are fixed, and therefore in some cases, processings which are not necessary are executed, and in other cases, essential processings are not executed.
For example, in a tone generator or a musical tone-generating program which can generate musical tones simultaneously through a plurality of tone-generating channels, musical tones are generated through each tone-generating channel independently of those generated through the other channels, and the number of waveform samples to be generated per unit time is constant for all the tone-generating channels. Therefore, although musical tones generated through each channel have different characteristics from those generated through the other channels and have different qualities required according to the kinds of the musical tones, the same number of waveform samples are generated for all the tone-generating channels. As a result, the conventional tone generator or the musical tone-generating program performs wasteful operations for generating musical tones.
For example, to generate musical tones with frequency components over a broad frequency band, i.e. with a high quality, the operation for generating musical tone waveforms has to be carried out at a high sampling frequency (i.e. with a large number of samples), while to generate musical tones with frequency components only in a low frequency band, it suffices to perform the operation for generating musical tone waveforms at a low sampling frequency (i.e. with a small number of samples). Further, some music pieces require a large number of musical tones to be generated but with a low quality when they are performed, and other music pieces require only a small number of musical tones to be generated but with a high quality. Further, a tone-generating channel which generates musical tones for an outstanding part of a music piece to be performed, such as a leading part, is required to generate musical tones with a high quality, while a tone-generating channel which generates musical tones for an inconspicuous part such as a backing part, is allowed to generate musical tones with a degraded quality, giving almost no difference in sound quality to a listener.
Further, some types of musical tones require conversion of the pitch of musical tone waveforms thereof when they are generated, while other types of musical tones do not require such conversion of the pitch. Some types of musical tones require modulation by means of an LFO (Low Frequency Oscillator), while other types do not require the same. Some types of musical tones require tone color processing by means of a digital filter, while others do not require the same, and some types of musical tones require imparting effects thereto, while others do not require the same. The conventional tone generator, however, has fixed circuits, and therefore it is difficult to add a new processing or omit a dispensable processing to or from the original fixed processings, which requires addition of a complicated circuit.
(2) In a tone generator which is realized by software (software tone generator), the amount of operation by a CPU thereof dynamically changes depending upon the number of tone-generating channels which are currently under operation for generating musical tones and the contents of musical tone-generating operations performed by the tone generator. When a software tone generator program (hereinafter referred to as xe2x80x9cthe software tone generatorxe2x80x9d) is implemented by a general-purpose computer in parallel with other application programs (hereinafter referred to as xe2x80x9cthe other applicationsxe2x80x9d), the operation of the other applications can sometimes be unstable due to a change in the amount of operation by the software tone generator particularly an increase in the amount of operation.
(3) The amount of operation that can be allotted to the software tone generator to be processed is limited not only by the number and types of the other applications executed in parallel but also by the processing capacity of the processing unit which carries out the operation. Since the amount of operation allotted is thus severely limited and also the operation for generating musical tones is performed in a fixed or unversatile manner, even if a user wants to generate an increased number of musical tones at the same time but with a degraded quality, or to generate a smaller number of musical tones but with a high quality, he cannot choose either of the two operation modes.
It is a first object of the invention to provide a musical tone-generating method and a musical tone-generating apparatus which are capable of generating musical tones in either of a mode in which an increased number of musical tones are generated or a mode in which musical tones are generated with a high quality, depending on the user""s choice, i.e. the purpose of use of musical tone generation.
It is a second object of the invention to provide a musical tone-generating method and a musical tone-generating apparatus which are capable of changing the contents of operation for generating musical tone waveforms, depending on the contents of musical tones to be generated and applications executed in parallel with the operation for generating musical tone waveforms.
To attain the first object, according to a first aspect of the invention, there are provided a method of generating musical tones, comprising a musical tone-generating step of generating musical tones, based on musical tone waveform samples generated through a plurality of channels, a performance information-inputting step of inputting performance information, a control information-inputting step of inputting control information depending on an amount of operation of an operating element operated by a user, and a musical tone waveform sample-generating step of generating musical tone waveform samples for each of the channels corresponding to the performance information input within a predetermined time period, in a number corresponding to the input control information, whenever the predetermined time period elapses, the musical tone-generating step generating musical tones, based on the generated musical tone waveform samples, and an apparatus for generating musical tones, comprising musical tone-generating means for generating musical tones, based on musical tone waveform samples generated through a plurality of channels, performance information-inputting means for inputting performance information, control information-inputting means for inputting control information depending on an amount of calculation of an operating element operated by a user, and musical tone waveform sample-generating means for generating musical tone waveform samples for each of the channels corresponding to the performance information input within a predetermined time period, in a number corresponding to the input control information, whenever the predetermined time period elapses, the musical tone-generating means generating musical tones, based on the generated musical tone waveform samples.
As a result, musical tones can be generated in either of a mode in which an increased number of musical tones are generated or a mode in which musical tones are generated with a high quality, depending on the user""s choice.
To attain the first object, according to a second aspect of the invention, there are provided a method of generating musical tones, comprising a musical tone-generating step of generating musical tones, based on musical tone waveform samples generated through a plurality of channels, a performance information-inputting step of inputting performance information for a plurality of parts, a control information-setting step of setting control information for each of the parts, and a musical tone waveform sample-generating step of assigning the input performance information to at least part of the channels, and generating musical tone waveform samples through the at least part of the channels, in response to the input performance information, at a time density corresponding to the set control information for each of the parts corresponding to the input performance information, the musical tone-generating step generating musical tones, based on the generated musical tone waveform samples, and an apparatus for generating musical tones, comprising musical tone-generating means for generating musical tones, based on musical tone waveform samples generated through a plurality of channels, performance information-inputting means for inputting performance information for a plurality of parts, control information-setting means for setting control information for each of the parts, and musical tone waveform sample-generating means for assigning the input performance information to at least part of the channels, and for generating musical tone waveform samples through the at least part of the channels, in response to the input performance information, at a time density corresponding to the set control information for each of the parts corresponding to the input performance information, the musical tone-generating means generating musical tones, based on the generated musical tone waveform samples.
As a result, a part having a larger listening effect can be generated with a high quality, to thereby enable making the most of the limited processing capacity of the musical tone-generating apparatus.
To attain the first object, according to a third aspect of the invention, there are provided a method of generating musical tones, comprising a musical tone-generating step of generating musical tones, based on musical tone waveform samples, a performance information-inputting step of inputting performance information, a control information-generating step of generating control information, and a musical tone waveform sample-generating step of carrying out a musical tone-generating calculation based on waveform data stored in a waveform memory beforehand, in response to the input performance information, to thereby generate musical tone waveform samples at a time density corresponding to the generated control information, the musical tone waveform sample-generating step carrying out the musical tone-generating calculation by selectively using different data of the waveform data stored in the waveform memory according to the generated control information, the musical tone-generating step generating musical tones, based on the generated musical tone waveform samples generated by the musical tone-generating calculation, and an apparatus for generating musical tones, comprising musical tone-generating means for generating musical tones, based on musical tone waveform samples, performance information-inputting means for inputting performance information, control information-generating means for generating control information, a waveform memory for storing waveform data, and musical tone waveform sample-generating means for carrying out a musical tone-generating calculation based on waveform data stored in the waveform memory, in response to the input performance information, to thereby generate musical tone waveform samples at a time density corresponding to the generated control information, the musical tone waveform sample-generating means carrying out the musical tone-generating calculation by selectively using different data of the waveform data stored in the waveform memory according to the generated control information, the musical tone-generating means generating musical tones, based on the generated musical tone waveform samples generated by the musical tone-generating calculation.
As a result, in a channel for generating musical tones at a high equivalent sampling frequency, waveform data having frequency components over a broad band (with a high recording sampling frequency) can be processed, while in a channel for generating musical tones at a low equivalent sampling frequency, waveform data having frequency components over a narrow band (with a low recording sampling frequency) can be processed. This makes it unnecessary to change designation of a waveform in the tone color data.
If waveform data to be selected is not changed according to the time density of musical tone waveform samples to be generated, aliasing noises can be generated in generated musical tone waveform samples, or a musical tone with a quality corresponding to the time density cannot be generated for the following reasons. The time density means a sampling frequency at which musical tone waveform samples are generated, which is designated an equivalent sampling frequency, in the present specification. According to the sampling theorem, reproduced musical tone waveform samples can have frequency components in a frequency band equal to or less than half of the recording sampling frequency (hereinafter referred to as xe2x80x9cthe upper limit frequencyxe2x80x9d) of the original musical tone waveform.
When musical tones are generated by using waveform data stored in a waveform memory, the stored waveform data is converted into waveform samples having a pitch of musical tones to be generated (hereinafter referred to as xe2x80x9cthe pitch conversionxe2x80x9d) at an equivalent frequency, and musical tone waveforms are generated based on waveform data after the pitch conversion. In this case, when the waveform data obtained by the pitch conversion contains frequency components higher than the upper limit frequency corresponding to the equivalent frequency, the frequency components are mixed into the waveform data after the pitch conversion as aliasing noises. On the other hand, if the waveform data obtained after the pitch conversion contains only frequency components much lower than the upper limit frequency, e.g. frequency components ⅓ times of the upper limit frequency, in spite of waveform generation at a high equivalent sampling frequency, only musical tones devoid of high frequency band components are generated, resulting in not so much an improvement in the quality of generated musical tones.
In the third aspect, waveform data for generating musical tones are prepared, which are suitable for respective time densities for generating musical tone waveform samples, and the waveform data are selectively used depending on the time density which is required for generating musical tones.
To attain the first object, according to a fourth aspect of the invention, there is provided a method of generating musical tones, comprising a first storing step of storing in memory means first waveform data for generating musical tones at a predetermined sampling frequency, a second storing step of converting the stored first waveform data to waveform data sampled at a sampling frequency different from the predetermined sampling frequency, and storing the waveform data sampled at the different sampling frequency in the memory means as second waveform data, and a musical tone waveform sample-generating step of generating musical tone waveform samples, based on the first waveform data or the second waveform data stored in the memory means, the musical tone waveform sample-generating step being capable of generating the musical tone waveform samples at a plurality of different time densities, by selecting the first waveform data or the second waveform data according to the different time densities and generating the musical tone waveform data based on the selected first or second waveform data.
According to the fourth aspect, similarly to the third aspect, aliasing noises can be eliminated. Further, musical tone waveform samples can be generated which sound as the same tone color while having been generated at different time densities.
Preferably, the method according to the fourth aspect includes a control information-generating step of generating control information, and the time densities are selected according to the generated control information.
To attain the second object, according to a fifth aspect of the invention, there are provided a method of generating musical tones, comprising a performance information-inputting step of inputting performance information, a selection information-inputting step of inputting selection information, a musical tone waveform-generating step of carrying out a musical tone waveform calculation in response to the input performance information, for generating musical tone waveforms, and a musical tone-generating step of generating musical tones by selectively subjecting the generated musical tone waveforms to a plurality of characteristic control processings according to the input selection information, the characteristic control processings having different processing contents and calculation amounts from each other, and an apparatus for generating musical tones, comprising performance information-inputting means for inputting performance information, selection information-inputting means for generating selection information, musical tone waveform-calculating means for carrying out a musical tone waveform calculation in response to the input performance information, for generating musical tones, and musical tone waveform-generating means for generating musical tones by selectively subjecting the generated musical tone waveforms to a plurality of characteristic control processings according to the input selection information, the characteristic control processings having different processing contents and calculation amounts from each other.
As a result, the contents of musical tone control processings are changed or the amount of processing is reduced by not carrying out a specific musical tone control according to the purpose of performance or the performance mode of musical tones to be generated, thereby enabling increasing the number of musical tones to be generated by the reduced amount of processing or using the CPU power for another purpose.
Preferably, the method according to the fifth aspect includes a display step of displaying on display means an amount of calculation required by the musical tone waveform calculation and a number of musical tones generated by the musical tone waveform calculation.
More preferably, the selection information is information for adding or omitting at least one characteristic control element used by the characteristic control processings to which the generated musical tone waveforms are subjected, an amount of calculation by the musical tone waveform calculation required for generating a musical tone waveform for one musical tone varying according to the addition or omission of the at least one characteristic control element.
The at least one characteristic control element includes, for example, modulation by means of an LFO (Low Frequency Oscillator), interpolation, digital filter processing, and reverberation processing.
To attain the second object, according to a sixth aspect of the invention, there are provided a method of generating musical tones, comprising a performance information-inputting step of inputting performance information, a limitation information-inputting step of inputting limitation information, and a musical tone waveform-generating step of carrying out a musical tone waveform calculation in response to the input performance information, for generating musical tone waveforms, the musical tone waveform-generating step generating musical tone waveforms by the musical tone waveform calculation which has an amount of calculation thereof limited in range by the limitation information, and an apparatus for generating musical tones, comprising performance information-inputting means for inputting performance information, limitation information-inputting means for inputting limitation information, and musical tone waveform-calculating means for carrying out a musical tone waveform calculation in response to the input performance information, for generating musical tones, the musical tone waveform-calculating means generating musical tone waveforms by the musical tone waveform calculation which has an amount of calculation thereof limited in range by the limitation information.
As a result, the amount of calculation is limited, and musical tone waveform data generated by the limited amount of calculation can be read and reproduced in a stable manner without interruption. In other words, even if the amount of calculation for generating musical tones is changed on a real-time basis, a predetermined amount of CPU power is surely preserved for other applications and therefore the other applications can be executed in a stable manner in parallel with the operation of the software tone generator.
Preferably, the method according to the sixth aspect includes a display step of displaying on display means an amount of calculation required by the musical tone waveform calculation and a number of musical tones generated by the musical tone waveform calculation.
To attain the second object, according to a seventh aspect of the invention, there are provided a method of generating musical tones, comprising a performance information-inputting step of inputting performance information, a calculation accuracy information-inputting step of inputting calculation accuracy information, and a musical tone waveform-generating step of carrying out a musical tone waveform calculation in response to the input performance information, for generating musical tone waveforms, the musical tone waveform-generating step generating musical tone waveforms by the musical tone waveform calculation which has calculation accuracy thereof designated by the input calculation accuracy information, and an apparatus for generating musical tones, comprising performance information-inputting means for inputting performance information, calculation accuracy information-inputting means for inputting calculation accuracy information, and musical tone waveform-calculating means for carrying out a musical tone waveform calculation in response to the input performance information, for generating musical tone waveforms, the musical tone waveform-calculating means generating musical tone waveforms by the musical tone waveform calculation which has calculation accuracy thereof designated by the input calculation accuracy information.
As a result, the calculation accuracy can be set according to the degree of tone quality required for generated musical tones or the amount of calculation available for processing.
The calculation accuracy information means, for example, the equivalent sampling frequency (the number of musical tone waveform samples to be generated per unit time), and by degrading the accuracy of calculation, the amount of calculation can be reduced.
Preferably, the method according to the seventh aspect includes a display step of displaying on display means an amount of calculation required by the musical tone waveform calculation and a number of musical tones generated by the musical tone waveform calculation.
To attain the second object, according to an eighth aspect of the invention, there is provided an apparatus for generating musical tones, comprising tone-generating information-storing means for storing tone-generating information, musical tone waveform-generating means for generating musical tone waveforms, based on the stored tone-generating information, and for changing a maximum number of musical tones to be generated simultaneously based on the stored tone=generating information, control information-generating means for generating control information indicative of a current value of the maximum number of musical tones to be generated simultaneously by the musical tone waveform-generating means, performance information-inputting means for inputting performance information, and control means for converting the input performance information to the tone-generating information according to the generated control information and writing the tone-generating information according to the generated control information into the tone-generating information-storing means.
As a result, the maximum number of tone-generating channels to be sounded simultaneously, which is set by a user or automatically changed, can be monitored on a tone generator driver side, and therefore the tone generator driver can suitably assign tone generation to tone-generating channels of the tone generator at any time, in response to input performance information.
Further, according to the invention, to attain the first and second objects, there are provided machine-readable storage mediums storing instructions to cause a machine to perform respective methods of generating musical tones according to the first to eighth aspects of the invention, which are set forth hereinabove.
The above and other objects, features, and advantages of the invention will be more apparent from the following detailed description taken in conjunction with the accompanying drawings.